#ifndef __TILESETMANAGER_H__
#define __TILESETMANAGER_H__

#include <vector>
#include <SFML/Graphics.hpp>
#include <boost/shared_ptr.hpp>
#include "RessourceManager.hpp"
#include "ImageManager.hpp"


class Tileset
{
	public :
		Tileset(const int widthTile = 0,const int heightTile = 0);
		void addTile(ImagePtr tile);
		ImagePtr tile(const unsigned int index);
		void setNbTiles(const int nbTiles);
		unsigned int nbTiles();
	private :
	
		int m_widthTile;
		int m_heightTile;
		std::vector<ImagePtr> m_tiles;
		
};

typedef boost::shared_ptr<Tileset> TilesetPtr;


class TilesetManager : public RessourceManager<Tileset>
{
	public :
	
	/** \return A reference to the unique instance of this class. */
	static TilesetManager& instance();

    /** \brief Load an image from its definition
        \param resDef The definition of the image to load

        \note Only the name is relevant in its definition.
    */
	bool loadRessource(RessourceDef& resDef);

	private :

   	/** \brief Default private constructor */
	TilesetManager();

   	/** \brief Default private destructor */
	~TilesetManager();

};


#endif /* __TILESETMANAGER_H__ */

